package com.kehutong.crm.message.entity;

import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.util.IDType;
import com.kehutong.common.enums.TemplateType;
import com.kehutong.common.enums.MessageBusinessEnum;

@Table(value="t_message_account", comment="用户消息管理", multi=true, idType = IDType.TIMESTAMP)
public class MessageAccount extends Entity {

    private static final long serialVersionUID = 644390034124937822L;

    protected MessageAccount(String id) {
        super(id);
    }

    @Column(comment = "模块类型")
    private MessageBusinessEnum businessEnum;

    @Column(comment = "模板类型")
    private TemplateType templateEnum;

    @Column(comment = "用户ID")
    private String uuid;

    @Column(comment = "是否用户创建，与uuid相对应，true小程序（业主），false企微等（员工）")
    private boolean userCreate;

    @Column(comment = "聚合消息ID，对应具体业务主键")
    private String msgId;

    @Column(comment="消息标题")
    private String title;

    @Column(comment="消息内容，公告此处填写二级分类标题", dbType = "TEXT", length = 65535)
    private String content;

    @Column(comment="企业编号")
    private String companyNum;

    @Column(comment = "业务上该消息是否已完成，默认待完成")
    private boolean successStatus;

    @Column(comment = "是否已阅")
    private boolean read;


    @Column(comment="逻辑删除")
    private boolean deleted;

    @Column(comment="页面跳转参数", length = 128)
    private String pageParam;

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public MessageBusinessEnum getBusinessEnum() {
        return businessEnum;
    }

    public void setBusinessEnum(MessageBusinessEnum businessEnum) {
        this.businessEnum = businessEnum;
    }

    public TemplateType getTemplateEnum() {
        return templateEnum;
    }

    public void setTemplateEnum(TemplateType templateEnum) {
        this.templateEnum = templateEnum;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCompanyNum() {
        return companyNum;
    }

    public void setCompanyNum(String companyNum) {
        this.companyNum = companyNum;
    }

    public boolean isSuccessStatus() {
        return successStatus;
    }

    public void setSuccessStatus(boolean successStatus) {
        this.successStatus = successStatus;
    }

    public boolean isRead() {
        return read;
    }

    public void setRead(boolean read) {
        this.read = read;
    }

    public boolean isUserCreate() {
        return userCreate;
    }

    public void setUserCreate(boolean userCreate) {
        this.userCreate = userCreate;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getPageParam() {
        return pageParam;
    }

    public void setPageParam(String pageParam) {
        this.pageParam = pageParam;
    }
}
